#ifndef _STDMYSTRING_H_
#define _STDMYSTRING_H_

class StdMyString
{
public:
    StdMyString();
    explicit StdMyString(const char* str);
    StdMyString(const StdMyString& str);
    ~StdMyString();

    StdMyString GetString(int start, int end);

    void InsertByIndex(int index, const char* str);
    void InsertByIndex(int index, const StdMyString& str);
    
    char At(int index);
    bool contaions(const StdMyString& str);
    bool contaions(const char* str);
    int Find(const StdMyString& str);
    int Find(const char* str);

    
    operator int();
    operator float();
    char& operator [](int index);
    void operator +=(const char* str);
    void operator +=(const StdMyString& str);
    StdMyString operator +(const char* str);
    StdMyString operator +(const StdMyString& str);
    StdMyString& operator =(const StdMyString& str);
    StdMyString& operator =(const char* str);
    bool operator ==(const StdMyString& str);
    bool operator ==(const char* str);
    bool operator !=(const StdMyString& str);
    bool operator !=(const char* str);
    bool operator >(const StdMyString& str);
    bool operator >(const char* str);
    bool operator <(const StdMyString& str);
    bool operator <(const char* str);
    friend std::ostream& operator <<(std::ostream& out, const StdMyString& str);

    static StdMyString Number(int value);
    static StdMyString Number(float value);

private:
    char* str;
    int size;
    int len;
};

std::ostream& operator <<(std::ostream& out, const StdMyString& str);

#endif